home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat2 / standard / mknod.z / mknod
Encoding:
Text File  |  1998-10-20  |  5.8 KB  |  133 lines

  1.  
  2.  
  3.  
  4. MMMMKKKKNNNNOOOODDDD((((2222))))                                                              MMMMKKKKNNNNOOOODDDD((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      mknod - make a directory, or a special or ordinary file
  10.  
  11. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ssssttttaaaatttt....hhhh>>>>
  14.  
  15.      iiiinnnntttt mmmmkkkknnnnoooodddd ((((ccccoooonnnnsssstttt cccchhhhaaaarrrr ****ppppaaaatttthhhh,,,, mmmmooooddddeeee____tttt mmmmooooddddeeee,,,, ddddeeeevvvv____tttt ddddeeeevvvv))));;;;
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      _m_k_n_o_d creates a new file named by the path name pointed to by _p_a_t_h.  The
  19.      mode of the new file (including file type bits) is initialized from _m_o_d_e.
  20.      The value of the file type bits which are permitted with this system call
  21.      are those listed below.  The other types listed in ssssyyyyssss////ssssttttaaaatttt....hhhh are made
  22.      with other system calls, or are not supported by this operating system.
  23.  
  24.                SSSS____IIIIFFFFIIIIFFFFOOOO fifo special
  25.                SSSS____IIIIFFFFCCCCHHHHRRRR character special
  26.                SSSS____IIIIFFFFBBBBLLLLKKKK block special
  27.                SSSS____IIIIFFFFRRRREEEEGGGG ordinary file
  28.  
  29.      All other mode bits are interpreted as described in _c_h_m_o_d(2).
  30.  
  31.      The owner ID of the file is set to the effective user ID of the process.
  32.      The group ID of the file is set to the effective group ID of the process
  33.      or the group ID of the directory in which the file is being created.
  34.      This is determined as follows:
  35.  
  36.           If the underlying filesystem was mounted with the BSD file creation
  37.           semantics flag [see _f_s_t_a_b(4)] or the SSSS____IIIISSSSGGGGIIIIDDDD bit is set [see
  38.           _c_h_m_o_d(2)] on the parent directory, then the group ID of the new file
  39.           is set to the group ID of the parent directory, otherwise it is set
  40.           to the effective group ID of the calling process.
  41.  
  42.      Values of _m_o_d_e other than those above are undefined and should not be
  43.      used.  The low-order 9 bits of _m_o_d_e are modified by the process's file
  44.      mode creation mask:  all bits set in the process's file mode creation
  45.      mask are cleared [see _u_m_a_s_k(2)].  If _m_o_d_e indicates a block or character
  46.      special file, _d_e_v is a configuration-dependent specification of a
  47.      character or block I/O device.  If _m_o_d_e does not indicate a block special
  48.      or character special device, _d_e_v is ignored.
  49.  
  50.      _m_k_n_o_d may be invoked only by the super-user for file types other than
  51.      FIFO special.
  52.  
  53.      _m_k_n_o_d will fail and the new file will not be created if one or more of
  54.      the following are true:
  55.  
  56.      [EPERM]          The effective user ID of the process is not super-user.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MMMMKKKKNNNNOOOODDDD((((2222))))                                                              MMMMKKKKNNNNOOOODDDD((((2222))))
  71.  
  72.  
  73.  
  74.      [ENOTDIR]        A component of the path prefix is not a directory.
  75.  
  76.      [ENOENT]         A component of the path prefix does not exist.
  77.  
  78.      [EROFS]          The directory in which the file is to be created is
  79.                       located on a read-only file system.
  80.  
  81.      [EEXIST]         The named file exists.
  82.  
  83.      [EFAULT]         _P_a_t_h points outside the allocated address space of the
  84.                       process.
  85.  
  86.      [ENAMETOOLONG]   The length of the _p_a_t_h argument exceeds {_P_A_T_H__M_A_X}, or a
  87.                       pathname component is longer than {_N_A_M_E__M_A_X}.
  88.  
  89.      [ENOSPC]         The directory in which the entry for the new directory
  90.                       is being placed cannot be extended because there is no
  91.                       space left on the file system containing the directory
  92.                       or the new directory cannot be created because there is
  93.                       no space left on the file system that will contain the
  94.                       directory or there are no free inodes on the file system
  95.                       on which the directory is being created.
  96.  
  97.      [EDQUOT]         The directory in which the entry for the new node is
  98.                       being placed cannot be extended either because the
  99.                       user's quota of disk blocks on the file system
  100.                       containing the directory has been exhausted or the
  101.                       user's quota of inodes on the file system on which the
  102.                       node is being created has been exhausted.
  103.  
  104.      [EINVAL]         If you create files of the type fifo special, character
  105.                       special, or block special on an NFS-mounted file system.
  106.  
  107. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  108.      mkdir(1), chmod(2), exec(2), mkdir(2), umask(2), fstab(4)
  109.  
  110. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  111.      Upon successful completion a value of 0 is returned.  Otherwise, a value
  112.      of -1 is returned and _e_r_r_n_o is set to indicate the error.
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.